<%@ page contentType="text/html; charset=UTF-8" language="java" import="java.sql.*" errorPage="" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <base href="<%=basePath%>"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>新增投保单</title>
<style type="text/css">
<!--
.WARNING1 {color: #FF0000}
.STYLE1 {
	font-size: 12px
}

.STYLE3 {
	font-size: 12px;
	font-weight: bold;
}

.STYLE4 {
	color: #03515d;
	font-size: 12px;
}

-->
</style>


		<script>
var highlightcolor = '#c1ebff';
//此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行,还没搞清楚为什么:(
var clickcolor = '#51b2f6';
function changeto() {
	source = event.srcElement;
	if (source.tagName == "TR" || source.tagName == "TABLE")
		return;
	while (source.tagName != "TD")
		source = source.parentElement;
	source = source.parentElement;
	cs = source.children;
	//alert(cs.length);
	if (cs[1].style.backgroundColor != highlightcolor && source.id != "nc"
			&& cs[1].style.backgroundColor != clickcolor)
		for (i = 0; i < cs.length; i++) {
			cs[i].style.backgroundColor = highlightcolor;
		}
}

function changeback() {
	if (event.fromElement.contains(event.toElement)
			|| source.contains(event.toElement) || source.id == "nc")
		return


if  (event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
//source.style.backgroundColor=originalcolor
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}

function  clickto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=clickcolor&&source.id!="nc")
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=clickcolor;
}
else
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}
</script>

<script type="text/javascript">
function submitForm() {
	document.forms["myform"].submit();
}

function deleteMultiple() {
	document.forms["form1"].submit();
}
</script>

		<script type="text/javascript">
// --列头全选框被单击---
function ChkAllClick(sonName, cbAllId) {
	var arrSon = document.getElementsByName(sonName);
	var cbAll = document.getElementById(cbAllId);
	var tempState = cbAll.checked;
	for (i = 0; i < arrSon.length; i++) {
		if (arrSon[i].checked != tempState)
			arrSon[i].click();
	}
}
// --子项复选框被单击---
function ChkSonClick(sonName, cbAllId) {
	var arrSon = document.getElementsByName(sonName);
	var cbAll = document.getElementById(cbAllId);
	for ( var i = 0; i < arrSon.length; i++) {
		if (!arrSon[i].checked) {
			cbAll.checked = false;
			return;
		}
	}
	cbAll.checked = true;
}
// --反选被单击---
function ChkOppClick(sonName) {
	var arrSon = document.getElementsByName(sonName);
	for (i = 0; i < arrSon.length; i++) {
		arrSon[i].click();
	}
}
</script>
</head>

<body style="font-size: 12px">
<span style="font-weight: 900;">你当前的位置：</span>[投保管理]-[修改退回单]
<form id="form1" name="form1" method="post" action="application/newInsuranceApp"> 
  <h4>基本信息  </h4>
  <hr />

  <p>投保单号：
    <label>
    <input type="text" name="insuranceApp.SAppNo" value="${app.SAppNo}" readonly="readonly" style="background-color: #CCC"/>
    </label> 
  </p> 
  <p>
    <span class="WARNING1">*</span>投保日期：
     <label>
     <input name="insuranceApp.DAppTm" type="text" value="${app.DAppTm}" />&nbsp; 
  </label>
  </p>
  <p><span class="WARNING1">*</span>保险起止期：
    <label>
    <input name="insuranceApp.DBgnTm" type="text" value="${app.DBgnTm}" />
    </label>
    &#8212;
    <label>
  <input name="insuranceApp.DEndTm" type="text" value="${app.DEndTm}" />
  </label>
  <label>
  <input type="checkbox" name="checkbox" value="checkbox" />
  </label>
  即时生效</p>
  <p>承保机构：
    <label>
     <input type="hidden"  name="insuranceApp.department.SDeptNo"  value="${app.department.SDeptNo}"/>
   	 <input type="text"   value="${app.department.SDeptNo}  ${app.department.SDeptName}" readonly="readonly" style="background-color: #CCC"/>
    </label>
    	产品：
  <label>
  	<input type="hidden" name="insuranceApp.product.SProductCde" value="${app.product.SProductCde}"/>
    <input type="text" value="${app.product.SProductCde}  ${app.product.SProductName}" readonly="readonly" style="background-color: #CCC"/>
  </label>
  </p>
  <p><span class="WARNING1">*</span>录单员：
    <label>
    <input name="insuranceApp.entering.SEmpCde"  value="${app.entering.SEmpCde}" type="hidden"/>
     <input value="${app.entering.SEmpName}" readonly="readonly" style="background-color: #CCC"/>
    </label>
    <span class="WARNING1">*</span>录单日期：
  <label>
  <input type="text" name="insuranceApp.DFillAppTm" value="${app.DFillAppTm}"/>
  </label>
  	<span class="WARNING1">*</span>业务员：
  <label>
  	 <input name="insuranceApp.businessMan.SEmpCde" value="${app.businessMan.SEmpCde}" type="hidden"/>
  	 <input value="${app.businessMan.SEmpCde} ${app.businessMan.SEmpName}" readonly="readonly" style="background-color: #CCC"/>
  </label>
  </p>
  <h4>投保人信息</h4>
  <hr />
  <p><span class="WARNING1">*</span>投保人名称：
    <label>
    	<input type="hidden" name="insuranceApp.applicant.SApplicantId" value="${app.applicant.SApplicantId}"/>
      	<input type="text" name="insuranceApp.applicant.SName" value="${app.applicant.SName}"/>
      </label>
    性别：
  <label>
  <select name="insuranceApp.applicant.SSex">
    <option value="男">男</option>
    <option value="女">女</option>
  </select>
  </label>
  <span class="WARNING1">*</span>投保人类型：
  <label>
  <select name="insuranceApp.applicant.SType">
    <option>法人</option>
    <option>个人</option>
  </select>
  </label>
  </p>
  <p><span class="WARNING1">*</span>证件类型：
    <label>
      <select name="insuranceApp.applicant.SCtcType">
        <option>身份证</option>
        <option>学生证</option>
        <option>军官证</option>
      </select>
    </label>
      <span class="WARNING1">*</span>证件号码：
    <label>
      <input type="text" name="insuranceApp.applicant.SCtcNum" value="${app.applicant.SCtcNum}"/>
      通讯地址：
      <input type="text" name="insuranceApp.applicant.SAddress" value="${app.applicant.SAddress}"/>
    </label>
  <p>
    邮编：
  <input type="text" name="insuranceApp.applicant.SZipCode" value="${app.applicant.SZipCode}"/>
    联系电话：
  <input type="text" name="insuranceApp.applicant.SMobile" value="${app.applicant.SMobile}"/>
    email:
  <input type="text" name="insuranceApp.applicant.SEmail" value="${app.applicant.SEmail}" />
  </p>
  <h4>被保人信息</h4>
  <hr />
  <input type="hidden" name="insuranceApp.insurant.SInsurantId" value="${app.insurant.SInsurantId}"/>
  <p><span class="WARNING1">*</span>被保人名称：
    <label>
      <input type="text" name="insuranceApp.insurant.SName" value="${app.insurant.SName}"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      </label> 
    性别： 
  <label>
  <select name="insuranceApp.insurant.SSex">
    <option value="男">男</option>
    <option value="女">女</option>
  </select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  </label>
  <span class="WARNING1"></span>&nbsp;投保人类型： 
  <label>
  <select name="insuranceApp.insurant.SType">
    <option value="法人">法人</option>
    <option value="个人">个人</option>
  </select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  </label>
  </p>
  <p><span class="WARNING1"> *</span>证件类型：
    <label>
      <select name="insuranceApp.insurant.SCtcType">
        <option value="身份证">身份证</option>
        <option value="学生证" selected="selected">学生证</option>
        <option value="军官证">军官证</option>
      </select>
      </label>
    <span class="WARNING1">*</span>证件号码： 
      <label>
      <input type="text" name="insuranceApp.insurant.SCtcNum" value="${app.insurant.SCtcNum}"/>
    </label> 
     &nbsp;&nbsp;通讯地址： 
      <input type="text" name="insuranceApp.insurant.SAddress" value="${app.insurant.SAddress}"/> 
  </p>
  <p>邮编： 
  <input type="text" name="insuranceApp.insurant.SZipCode" value="${app.insurant.SZipCode}"/>&nbsp;&nbsp;&nbsp; 联系电话： 
  <input type="text" name="insuranceApp.insurant.SMobile" value="${app.insurant.SMobile}"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; email:&nbsp;
  <input type="text" name="insuranceApp.insurant.SEmail" value="${app.insurant.SEmail}"/> 
  </p>
  <h4>车辆信息</h4>
  <hr />
  <input type="hidden" name="insuranceApp.vehicle.SVehicleId" value="${app.vehicle.SVehicleId}"/>
车牌号码：
<label>
<input type="text" name="insuranceApp.vehicle.SPlateNo" value="${app.vehicle.SPlateNo}"/>
  &nbsp;&nbsp;</label>
<span class="WARNING1">*</span>发动机号
<label>
<input type="text" name="insuranceApp.vehicle.SEngNo" value="${app.vehicle.SEngNo}"/>
&nbsp;&nbsp;</label>
<span class="WARNING1">*</span>车架号

<label>
<input type="text" name="insuranceApp.vehicle.SFrmNo" value="${app.vehicle.SFrmNo}"/>
</label>
<p>进口/国产：
  <label>
  <select name="select3">
    <option>进口</option>
    <option>国产</option>
  </select>
&nbsp;&nbsp;  </label>
品牌
<label>
<input type="text" name="insuranceApp.vehicle.SBrand" value="${app.vehicle.SBrand}"/>
   &nbsp;&nbsp;</label>
车型：
<label> </label>
<label>
<input type="text" name="insuranceApp.vehicle.SModel" value="${app.vehicle.SModel}"/>
</label>
</p>
<p><span class="WARNING1">*</span>使用性质：
  <label>
  <input type="text" name="insuranceApp.vehicle.SUsage" value="${app.vehicle.SUsage}"/>
   &nbsp;&nbsp;</label>
  <span class="WARNING1">*</span>车辆类型：
  <label>
  <input type="text" name="insuranceApp.vehicle.SType" value="${app.vehicle.SType}"/>
  </label> 
  座位数：
  <label>
  <input type="text" name="insuranceApp.vehicle.NSeatNum" value="${app.vehicle.NSeatNum}"/>
  </label>
</p>
<p>新车购置价：
  <label>
  <input type="text" name="insuranceApp.vehicle.NNewPurchaseValue" value="${app.vehicle.NNewPurchaseValue}"/>
  </label>
   &nbsp;&nbsp;是否外地车：
<label>
  <select name="select5">
    <option>是</option>
    <option>否</option>
  </select>
  </label>
   &nbsp;&nbsp;行驶区域：
<label>
<select name="insuranceApp.vehicle.SRunArea">
  <option selected="selected" value="境内">境内</option>
  <option value="省内">省内</option>
  <option value="固定行驶路线">固定行驶路线</option>
  <option value="场内">场内</option>
</select>
</label>
&nbsp;&nbsp;初登年月：<label> 
  <input type="text" name="insuranceApp.vehicle.SFstRegYm" value="${app.vehicle.SFstRegYm}"/> 
  </label>
</p>
<h4>驾驶员信息</h4>
<hr />
<p>驾驶员名称：
  <label>
  <input type="text" name="insuranceApp.vehicle.vhlDriver.SDrvName" value="${app.vehicle.vhlDriver.SDrvName}"/>
  </label>
   &nbsp; 
   &nbsp;&nbsp;&nbsp;出生年月：
<label>
  <input name="insuranceApp.vehicle.vhlDriver.SBirthday" type="text" value="${vehicle.vhlDriver.SBirthday}" />
  </label>
   &nbsp;&nbsp; 
   &nbsp;&nbsp;年龄：
<input type="text" name="insuranceApp.vehicle.vhlDriver.SAge" value="${app.vehicle.vhlDriver.SAge}"/>
  岁
</p>
<p>
  性别：
  <label>
    <select name="">
      <option>男</option>
      <option>女</option>
    </select>
      </label>
  &nbsp; &nbsp; 
   &nbsp;&nbsp;驾龄：
  <label>
    <input type="text" name="insuranceApp.vehicle.vhlDriver.SDriverAge" value="${app.vehicle.vhlDriver.SDriverAge}"/>
    年</label> 
   &nbsp;&nbsp; 
   &nbsp;&nbsp;婚姻状况：
    <label>
    <select name="insuranceApp.vehicle.vhlDriver.SMariSts">
      <option selected="selected" value="${app.vehicle.vhlDriver.SMariSts}">${app.vehicle.vhlDriver.SMariSts}</option>
      <option value="已婚">已婚</option>
      <option value="未婚">未婚</option>
      <option value="离婚">离婚</option>
      <option value="不详">不详</option>
      </select>
    </label>
</p>
<p>驾驶证号：
  <label>
  <input type="text" name="insuranceApp.vehicle.vhlDriver.SDrvLns" value="${app.vehicle.vhlDriver.SDrvLns}"/>
    </label>
   &nbsp;&nbsp; 
   &nbsp;&nbsp;职业类别：
<label>
  <select name="insuranceApp.vehicle.vhlDriver.SMajor">
  	<option value="${app.vehicle.vhlDriver.SMajor}" selected="selected">${app.vehicle.vhlDriver.SMajor}</option>
    <option value="行政公务员">行政公务员</option>
    <option value="商贸服务">商贸服务</option>
    <option value="产业工人">产业工人</option>
    <option value="科教院校">科教院校</option>
  </select>
  </label>
</p>
<h4>车主信息</h4>
<hr />
 <input type="hidden" name="insuranceApp.vehicle.vhlOwner.SClientId" value="${app.vehicle.vhlOwner.SClientId}"/>
<p><span class="WARNING1">*</span>车主名称：
  <label>
  <input type="text" name="insuranceApp.vehicle.vhlOwner.SName" value="${app.vehicle.vhlOwner.SName}"/>
  </label>
  <span class="WARNING1"></span>
  <span class="WARNING1">*</span>证件类型：
  <label>
  <select name="insuranceApp.vehicle.vhlOwner.SCtcType">
  	<option value="${app.vehicle.vhlOwner.SCtcType}" selected="selected">${app.vehicle.vhlOwner.SCtcType}</option>
    <option value="身份证">身份证</option>
    <option value="学生证">学生证</option>
    <option value="军官证">军官证</option>
  </select>
  </label>
  <span class="WARNING1">*</span>证件号码：
  <label>
  <input type="text" name="insuranceApp.vehicle.vhlOwner.SCtcNum" value="${insuranceApp.vehicle.vhlOwner.SCtcNum}"/>
  </label>
</p>
<p> 通讯地址： 
    <input type="text" name="insuranceApp.vehicle.vhlOwner.SAddress" value="${app.vehicle.vhlOwner.SAddress}"/>
    &nbsp;&nbsp; 邮编： 
    <input type="text" name="insuranceApp.vehicle.vhlOwner.SZipCode" value="${app.vehicle.vhlOwner.SZipCode}"/>&nbsp;&nbsp;&nbsp; 
    联系电话： 
  <input type="text" name="insuranceApp.ivehicle.vhlOwner.SPhone" value="${app.vehicle.vhlOwner.SPhone}"/>
  <br />
</p>
<h4>险别信息</h4>
<hr />
<table width="100%" border="0" cellpadding="0" cellspacing="1"
									bgcolor="b5d6e6" onmouseover="changeto()"
									onmouseout="changeback()">
  <tr>
    <td width="5%" height="22" background="tab/images/bg.gif"
											bgcolor="#FFFFFF"><div align="center"> <span class="STYLE1">序号</span></div></td>
    <td width="10%" height="22" background="tab/images/bg.gif"
											bgcolor="#FFFFFF"><div align="center"> <span class="STYLE1">险别代码</span></div></td>
    <td width="16%" height="22" background="tab/images/bg.gif"
											bgcolor="#FFFFFF"><div align="center"> <span class="STYLE1">险别名称</span></div></td>
    <td width="12%" background="tab/images/bg.gif"
											bgcolor="#FFFFFF"><div align="center">保额</div></td>
    <td width="14%" background="tab/images/bg.gif"
											bgcolor="#FFFFFF"><div align="center">基础保费</div></td>
    <td width="14%" background="tab/images/bg.gif"
											bgcolor="#FFFFFF"><div align="center">优惠系数</div></td>
    <td width="14%" background="tab/images/bg.gif"
											bgcolor="#FFFFFF"><div align="center">折前保费</div></td>
    <td width="15%" background="tab/images/bg.gif"
											bgcolor="#FFFFFF"><div align="center">实交保费</div></td>
  </tr>
  <s:iterator value="#request.app.insuredCvrg" status="status" var="inscvrg">
    <tr>
      <td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE1">
        <div align="center">
          <s:property value="#status.index+1" />
        </div>
      </div></td>
      <td height="20" bgcolor="#FFFFFF"><div align="center"> <span class="STYLE1">
        <s:property value="cvrg.SCvrgNo" />
      </span></div></td>
      <td height="20" bgcolor="#FFFFFF"><div align="center"> <span class="STYLE1">
        <s:property value="cvrg.SCvrgNm" />
      </span></div></td>
      <td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE1">
        <div align="center"> 122000元 </div>
      </div></td>
      <td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE1">
        <div align="center">
          <s:property value="NBasePrm"/>
          元 </div>
      </div></td>
      <td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE1">
        <div align="center">
          <s:property value="NDisCoef"/>
        </div>
      </div></td>
      <td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE1">
        <div align="center">
          <s:property value="NBefPrm"/>
          元 </div>
      </div></td>
      <td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE1">
        <div align="center">
          <s:property value="NPremium"/>
          元 </div>
      </div></td>
    </tr>
  </s:iterator>
</table>
<h4>浮动系数</h4>
<hr />
<s:if test="#request.prod.SProductCde == '030001'">
	<jsp:include page="coef_traffic.jsp" />
</s:if>
<s:elseif test="#request.prod.SProductCde == '033001'">
	<jsp:include page="coef_business.jsp" />
</s:elseif>
<h4>特别约定</h4>
<hr />
<table width="100%" border="0" cellpadding="0" cellspacing="1"
									bgcolor="b5d6e6" onmouseover="changeto()"
									onmouseout="changeback()">
		  <tr>
		    <td width="10%" height="22" background="tab/images/bg.gif"
											bgcolor="#FFFFFF"><div align="center"><input type="checkbox" name="specAll" id="specAll"
																			title="全选" onclick="ChkAllClick('specNoCheckbox','specAll')" /></div></td>
		    <td width="9%" height="22" background="tab/images/bg.gif"
											bgcolor="#FFFFFF"><div align="center"> <span class="STYLE1">序号</span></div></td>
		    <td width="13%" height="22" background="tab/images/bg.gif"
											bgcolor="#FFFFFF"><div align="center"> <span class="STYLE1">特约代码</span></div></td>
		    <td width="68%" height="22" background="tab/images/bg.gif"
											bgcolor="#FFFFFF"><div align="center"> <span class="STYLE1">特约内容</span></div></td>
	      </tr>
	      
		    <s:iterator value="#request.app.specConventions" status="status" var="spec">
		      <tr>
		        <td height="20" bgcolor="#FFFFFF"><div align="center">
		          <input type="checkbox" name="specNoCheckbox" value="<s:property value="SSpecCvtNo" />"
														onclick="ChkSonClick('specNoCheckbox','specAll')" />
		          </div></td>
		        <td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE1">
		          <div align="center">
		            <s:property value="#status.index+1" />
	              </div>
		          </div></td>
		        <td height="20" bgcolor="#FFFFFF"><div align="center"> <span class="STYLE1">
		          <s:property value="SSpecCvtNo" />
		          </span></div></td>
		        <td height="20" bgcolor="#FFFFFF">
		          <div align="center" style="text-align: left;"> <span class="STYLE1">
		            <s:property value="SSpecCvtCtd" />
		            </span></div></td>
	          </tr>
	       </s:iterator>
</table>
<p></p>
<div style=" text-align:center"><input type="submit" value="修改"/></div>
<p></p>

</form>
</body>
</html>
